package com.weixing.mall.provider.model.dto.cms;


import com.weixing.mall.base.constant.DatePattern;
import com.weixing.mall.provider.model.enums.cms.NewsStatusEunm;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @Author wx
 * @Date 2019/7/26 9:47
 * @Version 1.0
 */
@Data
@ApiModel(description = "公告管理")
public class NewsDto {

    @ApiModelProperty(value = "id")
    private Long id;
    @ApiModelProperty(value = "公告标题")
    @NotNull(message = "公告标题不能为空")
    private String title;
    @ApiModelProperty(value = "副标题")
    private String subTitle;
    @ApiModelProperty(value = "简述")
    private String desp;
    @ApiModelProperty(value = "发布人")
    private String pubMan;
    @ApiModelProperty(value = "公告内容")
    @NotNull(message = "公告内容不能为空")
    private String content;
    @ApiModelProperty(value = "展示图")
    @NotNull(message = "展示图不能为空")
    private String img;
    @ApiModelProperty(value = "公告类别")
    @NotNull(message = "公共类别不能为空")
    private Integer type;
    @ApiModelProperty(value = "公告状态")
    @NotNull(message = "公告状态不能为空")
    private NewsStatusEunm status;
    @ApiModelProperty(value = "截止时间")
//    @NotNull(message = "公告截止时间不能为空")
    @DateTimeFormat(pattern= DatePattern.NORM_DATE_PATTERN)
    private Date endTime;
}
